﻿@model HinduShop.UI.ViewModels.StoreManager.ProductListViewModel

@{
    ViewBag.Title = "Index";
    
}

<h2>Все продукты</h2>

<p>@Html.ActionLink("Добавить продукт", "Create")</p>
<table>
    <tr>
        <th>Id</th>
        <th>Name</th>
        <th>Category</th>
        <th>Price</th>
        <th></th>
    </tr>
    @foreach (var item in Model.Products)
    {
        <tr>
            <td>@Html.DisplayFor((modelItem => item.ProductId))</td>
            <td>@Html.DisplayFor(modelItem => item.ProductName)</td>
            <td>@Html.DisplayFor(modelItem => item.CategoryName)</td>
            <td>@Html.DisplayFor(modelItem => item.ProductPrice)</td>
            <td>
                @Html.ActionLink("Edit", "Edit", new { id = item.ProductId });
                @Html.ActionLink("Details", "Details", new { id = item.ProductId });
                @Html.ActionLink("Delete", "Delete", new { id = item.ProductId });
            </td>
        </tr>
    }
</table>

@{ Html.RenderAction("Summary", "Cart"); }